﻿using Adnc.WebApi.Shared;
using Microsoft.AspNetCore.Mvc;
using WYT.Sys.Application.Contracts.Dtos.Brand;
using WYT.Sys.Application.Contracts.Services;

namespace WYT.Sys.WebApi.Controllers
{
    /// <summary>
    /// 品牌介绍服务
    /// </summary>
    [Route("sys/[Controller]")]
    [ApiController]
    public class BrandController : AdncControllerBase
    {
        private readonly IBrandAppService _brandAppService;

        public BrandController(IBrandAppService brandAppService)
        {
            _brandAppService = brandAppService;
        }

        /// <summary>
        /// 获取所有品牌介绍
        /// </summary>
        /// <returns></returns>
        [HttpGet("infor")]
        public async Task<WYTActionResult<List<BrandInforDto>>> GetBandInforList()
        {
            return Success(await _brandAppService.GetBandInforList());
        }

        /// <summary>
        /// 获取分组信息
        /// </summary>
        /// <returns></returns>
        [HttpGet("group")]
        public async Task<WYTActionResult<List<BrandGroupDto>>> GetBrandGroupList()
        {
            return Success(await _brandAppService.GetBrandGroupList());
        }
    }
}
